package com.hyt.it.ogt.ykcj.service.exam.impl;

import com.hyt.core.base.BaseServiceImpl;
import com.hyt.it.ogt.ykcj.common.utils.DateUtils;
import com.hyt.it.ogt.ykcj.domain.exam.ExamStemInfo;
import com.hyt.it.ogt.ykcj.mapper.exam.ExamStemInfoMapper;
import com.hyt.it.ogt.ykcj.service.exam.IExamStemInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考试题干信息Service业务层处理
 * 
 * @author admin
 * @date 2021-09-09
 */
@Service
public class ExamStemInfoServiceImpl extends BaseServiceImpl<ExamStemInfoMapper, ExamStemInfo> implements IExamStemInfoService
{
    @Autowired
    private ExamStemInfoMapper examStemInfoMapper;

    /**
     * 查询考试题干信息
     *
     * @param id 考试题干信息ID
     * @return 考试题干信息
     */
    @Override
    public ExamStemInfo selectExamStemInfoById(String id)
    {
        return examStemInfoMapper.selectExamStemInfoById(id);
    }

    /**
     * 查询考试题干信息列表
     *
     * @param examStemInfo 考试题干信息
     * @return 考试题干信息
     */
    @Override
    public List<ExamStemInfo> selectExamStemInfoList(ExamStemInfo examStemInfo)
    {
        return examStemInfoMapper.selectExamStemInfoList(examStemInfo);
    }

    /**
     * 修改考试题干信息
     *
     * @param examStemInfo 考试题干信息
     * @return 结果
     */
    @Override
    public int updateExamStemInfo(ExamStemInfo examStemInfo)
    {
        examStemInfo.setUpdateTime(DateUtils.getNowDate());
        return examStemInfoMapper.updateExamStemInfo(examStemInfo);
    }

    /**
     * 批量删除考试题干信息
     *
     * @param ids 需要删除的考试题干信息ID
     * @return 结果
     */
    @Override
    public int deleteExamStemInfoByIds(String[] ids)
    {
        return examStemInfoMapper.deleteExamStemInfoByIds(ids);
    }

    /**
     * 新增考试题干信息
     *
     * @param examStemInfo 考试题干信息
     * @return 结果
     */
    @Override
    public int insertExamStemInfo(ExamStemInfo examStemInfo)
    {
        examStemInfo.setCreateTime(DateUtils.getNowDate());
        return examStemInfoMapper.insertExamStemInfo(examStemInfo);
    }
}